package fun.boomcat.luckyhe.mirai.plugin.utils;

import net.mamoe.mirai.console.command.CommandManager;

public class PlayerCommandHelp {
    public static String helpStr(String primaryName, String[] secondaryNames) {
        StringBuilder sb = new StringBuilder();
        String commandPrefix = CommandManager.INSTANCE.getCommandPrefix();

        sb.append(commandPrefix).append(primaryName).append("指令 ");
        if (secondaryNames.length != 0) {
            sb.append("别名：");
            for (String secondaryName : secondaryNames) {
                sb.append(commandPrefix).append(secondaryName).append(" ");
            }
        }

        sb.append("\n");

        sb.append(commandPrefix).append(primaryName).append(" setmcid（别名：设置mcid）    设置绑定mcid\n");
        sb.append(commandPrefix).append(primaryName).append(" list（别名：所有指令）    查看所有映射指令\n");


        return sb.toString();
    }

    public static String setMcIdHelpStr(String primaryName) {
        StringBuilder sb = new StringBuilder();
        String commandPrefix = CommandManager.INSTANCE.getCommandPrefix();

        sb.append(commandPrefix).append(primaryName).append(" setmcid <mcid>    与mc的id绑定\n");
        sb.append("稍后将会往mc中发送验证码，再使用：\n");
        sb.append(commandPrefix).append(primaryName).append(" setmcid <mcid> <验证码>\n");
        sb.append("即完成绑定（验证码可多次发送）");

        return sb.toString();
    }
}
